Exercise One

Alter the sample program so that the ball is red when the mouse cursor is not on the ball, and blue when it is. You will need a new event type called isOver (as opposed to the isActive event).

Exercise Two

Instead of changing the color of the ball, try changing the transparency of the ball. The Java call to do this is:

       public native void setTransparency (float transparency);

For example, if you have a shape called shBOX and you wanted to change its transparency, do the following:

       shBOX.setTransparency(0.75f);

This will turn the box 75% transparent.